#pragma once


class CActionManager: public IActionManager, public IInputListener
{
public:
	CActionManager();
	~CActionManager();

	//	IActionManager
	virtual void RegisterListener(IActionListener* listener);
	virtual void UnregisterListener(IActionListener* listener);
	//	---

	//	IInputListener
	void OnInputEvent(const SInputEvent& input_event);
	//	---

private:
	void BindAction(EInputEvent input_event, const SActionEvent& action);
	void NotifyAction(const SActionEvent& action_event);

private:
	typedef std::vector<IActionListener*> TListeners;
	TListeners m_listeners;

	typedef std::map<EInputEvent, SActionEvent> TBinds;
	TBinds m_binds;
};